<?php
/*由bean脚本生成 powerBy--joe*/
namespace app\common\validate;

use app\common\bean\SystemRechargeBean;

class SystemRechargeValidate extends BaseValidate
{

	static $all = 'all';
	static $add = 'add';
	static $edit = 'edit';
	static $pkId = 'id';

	public function __construct(array $rules = [], array $message = [], array $field = [])
	{
		parent::__construct($rules, $message, $field);
		$this->rule = [
			 SystemRechargeBean::$id => 'require', //
			 SystemRechargeBean::$quota => 'require', //面额
			 SystemRechargeBean::$giveMoney => 'require', //赠送额外余额
			 SystemRechargeBean::$createtime => 'require', //
		];
		$this->message = [
			SystemRechargeBean::$id.POINST."require " => 'id必须', //
			SystemRechargeBean::$quota.POINST."require " => 'quota必须', //面额
			SystemRechargeBean::$giveMoney.POINST."require " => 'give_money必须', //赠送额外余额
			SystemRechargeBean::$createtime.POINST."require " => 'createtime必须', //
		];
		$this->scene = [
			self::$all => [
				SystemRechargeBean::$id,
				SystemRechargeBean::$quota,
				SystemRechargeBean::$giveMoney,
				SystemRechargeBean::$createtime,
			],
			self::$add => [
				SystemRechargeBean::$quota,
			],
			self::$edit => [
				SystemRechargeBean::$id,
				SystemRechargeBean::$quota,
			],
			self::$pkId => [],

		];
	}


}
